<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>评论列表</title>
  <link rel="stylesheet" href="./libs/bootstrap/css/bootstrap.min.css">
  <link rel="stylesheet" href="./css/reset.css">
  <link rel="stylesheet" href="./css/iconfont.css">
  <link rel="stylesheet" href="./css/main.css">
  <script src="./libs/jquery/jquery.js"></script>
  <link rel="stylesheet" href="./libs/layui/css/layui.css">
  <script src="./libs/art-template/template-web.js"></script>
  <script src="./libs/layui/layui.all.js"></script>
  <style>
    .show {
      display: block;
    }

    .hide {
      display: none;
    }
  </style>
</head>

<body>
  <div class="container-fluid">
    <div class="common_title">
      评论列表
    </div>
    <div class="container-fluid common_con">
      <table class="table table-striped table-bordered table-hover mp20">
        <thead>
          <tr>
            <th>作者</th>
            <th>评论</th>
            <th>评论在</th>
            <th>提交于</th>
            <th>状态</th>
            <th class="text-center" width="100">操作</th>
          </tr>
        </thead>
        <tbody>



        </tbody>
      </table>
      <div class="row text-center " id="fenye">

      </div>

    </div>
  </div>
  <h1>测试</h1>

  <script type="text/html" id="commen_list">
    {{each data.data item}}
    {{if item.state=='已拒绝'}}
    <tr class="danger">
      {{else}}
      <tr>
    {{/if}}
    
      <td>{{item.author}}</td>
      <td>{{item.content}}</td>
      <td>{{item.title}}</td>
      <td>{{item.date}}</td>
      <td>{{item.state}}</td>
      <td class="text-center">
       {{if item.state=='已拒绝'}}
       <a href="javascript:void(0);;" class="btn btn-success btn-xs btn_pizhun" data-id="{{item.id}}" data-articleId="{{item.articleId}}">批准</a>
       {{else if item.state=='已通过'}}
        <a href="javascript:void(0);;" class="btn btn-warning btn-xs btn_jujue" data-id="{{item.id}}" data-articleId="{{item.articleId}}" >拒绝</a>
        {{else}}
        <a href="javascript:void(0);;" class="btn btn-success btn-xs btn_pizhun" data-id="{{item.id}}" data-articleId="{{item.articleId}}" >批准</a>
        <a href="javascript:void(0);;" class="btn btn-warning btn-xs btn_jujue" data-id="{{item.id}}" data-articleId="{{item.articleId}}" >拒绝</a>
        {{/if}}
        <a href="javascript:void(0);;" class="btn btn-danger btn-xs btn_shanchu" data-id="{{item.id}}" data-articleId="{{item.articleId}}">删除</a>
        
      </td>
    </tr>
    {{/each}}
  </script>
  <script src="./js/commen_tlist.js"></script>
</body>

</html>